package org.wattdepot.cli;

import java.util.List;

/**
 * Prints out all the commands available for the command line interface.
 * @author wing
 * 
 */
public class HelpCommand implements WattDepotCliCommand {
  
  /**
   * This method prints out information to help users.
   * @param args list of strings input
   * @return a string of commands
   */
  public String doCommand(List<String> args) {
    String message = 
    "help\n" 
    + "quit\n"
    + "  Exits the system\n"
    + "sources\n"
    + "  Prints a table summarizing " +
        "the public sources in the system, one per line.\n"
    + "summary {source} summary\n"
    + "  Prints information about a single Source.\n"
    + "sensordata {source} timestamp {timestamp}\n"
    + "  Prints information about a single sensor data instance.\n"
    + "dailysensordata {source} day {day}\n"
    + "  Prints a table listing all of the " +
        "sensor data instances for the specified day.\n"
    + "power [generated|consumed] {source} timestamp {timestamp}\n"
    + "  Prints the power generated by the source at the given timestamp.\n"
    + "powerstats [generated|consumed] {source} day {day} " +
        "sampling-interval {minutes} statistic {max|min|average}\n"
    + "  Returns the maximum, minimum, or average power " +
        "generated  by the source for the day.\n"
    + "total [carbon|energy] {source} day {day} sampling-interval {minutes}\n"
    + "  Returns the total amount of carbon (or energy) " +
        "emitted by this source for the given day\n"
    + "chart power [generated|consumed] {source} {startday} " +
        "{endday} sampling-interval {minutes} file {file}\n"
    + "  Writes out an html file that will display a chart " +
        "illustrating the power for the source over the interval.\n"
    + "fueltypes {sources\n"
    + "  Returns a table of fuels associated with this source.\n"
    + "totalpower {source} {timestamp} fuelType {fueltype}\n"
    + "  Returns the total power generated by the given fuel type.\n"
    + "carboncontent {source} {timestamp} sampling-interval {interval}\n"
    + "  Returns the total carbon that would be emitted by that source " +
    "over an hour at the rate occuring as of the timestamp.";
    
    return message;
  }
  
}
